package com.scsj.supermarket.base;

import com.scsj.supermarket.bean.BaseBean;
import com.scsj.supermarket.bean.MyCollectGoodsBean;
import com.scsj.supermarket.bean.SelectCollectByUserBean;

import dkmvp.net.ResponseCallback;
import okhttp3.RequestBody;
import rx.Subscription;

/**
 *商品和店铺收藏查看，收藏和取消收藏
 */
public class CollectBase {

    public interface IView {

        /**
         * 查询收藏店铺的信息
         * @param s
         * @param selectCollectByUserBean
         */
        void showShopCollectSuccessMsg(String s, SelectCollectByUserBean selectCollectByUserBean);

        /**
         * 店铺收藏和取消收藏
         * @param s
         */
        void showShopAddAndDelCollectSuccessMsg(String s);

        /**
         * 查询收藏商品的信息
         * @param s
         * @param myCollectGoodsBean
         */
        void showGoodsCollectSuccessMsg(String s, MyCollectGoodsBean myCollectGoodsBean);

        /**
         * 用户添加收藏商品
         * @param s
         */
        void showGoodsAddCollectSuccessMsg(String s);

        /**
         *用户取消收藏商品
         * @param s
         */
        void showGoodsDelCollectSuccessMsg(String s);

        void showErrorMsg(String s);
    }

    public interface IPresenter {
        /**
         * 查询收藏店铺的信息
         */
        void deliverShopCollectData(RequestBody requestBody);
        void deliverShopAddAndDelData(RequestBody requestBody);
        void deliverGoodsCollectData(RequestBody requestBody);
        void deliverGoodsAddCollectData(RequestBody requestBody);
        void deliverGoodsDelCollectData(RequestBody requestBody);

    }

    public interface IModel {

        Subscription getShopCollectData(RequestBody requestBody, ResponseCallback<SelectCollectByUserBean> callback);
        Subscription getShopAddAndDelData(RequestBody requestBody, ResponseCallback<BaseBean> callback);
        Subscription getGoodsCollectData(RequestBody requestBody, ResponseCallback<MyCollectGoodsBean> callback);
        Subscription getGoodsAddCollectData(RequestBody requestBody, ResponseCallback<BaseBean> callback);
        Subscription getGoodsDelCollectData(RequestBody requestBody, ResponseCallback<BaseBean> callback);

    }
}
